// 禁止控件
.ajaxjs-disable {
	cursor: not-allowed;
	opacity: .65;
	box-shadow: none;
	background-image: none;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}

// -webkit-text-stroke: 1px rgba(255,255,255,0.5);
.ajaxjs-btn , .ajaxjs-btn-1 {
	height: 26px;
	font-size: .9rem;
	line-height: 10px;
	padding: .4em 2.3em;
	margin: 10px;
	color: #333;
	letter-spacing: .3em;
	border-radius: 4px;
	border: 1px solid #ccc;
	border-bottom-color: #B4B4B4;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
	background-color: lightgray;
	background-repeat: repeat-x;
	transition: background-image 0.5s linear 1s;
	.gradient (top , rgba(255, 255, 255, 1) 0% , rgba(239, 239, 239, 1) 60% , rgba(225, 223, 226, 1) 100%);
	img {
		vertical-align: middle;
	}

	&:hover {
		color: black;
		border-color: lighten(black, 65%);
	}

	&:active {
		box-shadow: inset 0 3px 5px rgba(0, 0, 0, .2);
		border-color: lighten(black, 55%);
	}

	&:focus {
		border-color: lighten(black, 60%);
	}

	&:hover {
		background-position: 0px -10px;
	}
}

.ajaxjs-btn-1 {
	background-position: 0px -15px;
	transition: all 200ms linear 300ms;
	&:hover {
		background-position: 0px -12px;
	}
}

.ajaxjs-input , .ajaxjs-inputField {
	min-height: 26px;
	padding: 4px;
	box-shadow: 1px 2px 3px lighten(#999, 30) inset;
	border-radius: 3px;
	border: 1px solid #abadb3;
	box-sizing: border-box;
	vertical-align: middle;
	color: #333;
	font-size: .9rem;
	letter-spacing: 1px;
	transition: border-color ease-in-out 200ms;
	&:hover , &:focus {
		border-color: lighten(black, 45);
	}
}

.ajaxjs-select {
	min-height: 26px;
	padding: 1px 4px;
	box-shadow: 1px 2px 3px #e5e5e5 inset;
	border-radius: 2px;
	border: 1px solid #abadb3;
	font-size: .9rem;
	-moz-appearance: none;
	-webkit-appearance: none;
	background: url("") no-repeat right;
	background-color: white;
	&:hover , &:focus {
		border-color: lighten(black, 45);
	}
}

// 多选列表框的边框
.ajaxjs-select[multiple] {
	border: 1px solid #abadb3;
	padding: 2px;
	&:hover , &:focus {
		border-color: lighten(black, 45);
	}
}

.ajaxjs-form {
	@media screen and (max-width: 480px) {
		dt {
			width: 40% ! important;
			float: initial ! important;
		}
	}

	dl {
		overflow: hidden;
		dd , dt {
			float: left;
			margin-bottom: 2%;
		}

		dt {
			width: 30%;
			span {
				color: red;
			}
		}

		dd {
			width: 70%;
			.tips , .state {
				display: none;
				margin-left: 10px;
				border: 1px solid gray;
				padding: 3px 3px;
				position: relative;
				strong {
					border-style: solid;
					height: 0;
					line-height: 0;
					width: 0;
					font-size: 0;
					position: absolute;
					border-width: 5px;
					&.arrow_1 {
						left: -11px;
						top: 7px;
						border-color: white gray white white;
					}

					&.arrow_2 {
						left: -9px;
						top: 7px;
						border-color: transparent white transparent transparent;
					}
				}
			}

			.state {
				color: red;
				font-weight: bold;
			}

			.errHighlight {
				border-color: red ! important;
				color: red;
			}
		}

		.note {
			color: gray;
			font-size: .9rem;
			margin-top: 2%;
		}
	}

	input[type=text] , input[type=password] , textarea {
		width: 100%;
		&:focus {
			border-color: #21a9ff;
		}
	}

	input[type=submit] , input[type=file] {
		cursor: pointer;
	}

	input[type="checkbox"] , input[type="radio"] {
		vertical-align: middle;
	}

	select {
		.ajaxjs-select;
	}
}

.form-1 {
	.ajaxjs-form;
	padding: 2%;
	dl {
		dt {
			width: 20%;
		}
	}

	input[type=text] , input[type=password] , textarea {
		.ajaxjs-inputField;
	}

	input[type=submit] , button {
		.ajaxjs-btn;
	}

	select {
		min-width: 150px;
	}
}

// 表单验证
form .errMsg {
	position: fixed;
}

////////////////////// 组件 ///////////////////////

.aj-page-captcha {
	input {
		width: 80%;
		float: left;
	}

	img {
		cursor: pointer;
		margin-left: 2%;
		height: 26px;
		width: 60px;
	}
}

// 日历选择器
.aj-form-calendar {
	font-family: Verdana;
	font-size: .8rem;
	background-color: white;
	border: 1px solid lightgray;
	border-radius: 5px;
	box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
	text-align: center;
	width: 320px;
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
	padding: 10px;
	line-height: 1.5em;
	a {
		color: #1e5494;
	}

	.selectYearMonth {
		float: right;
		width: 100px;
		div {
			display: inline-block;
		}
	}

	.showCurrentYearMonth {
		text-align: left;
		color: lightgray;
		font-size: 1.6rem;
		padding: 5% 0;
	}

	table {
		width: 100%;
		border: 0;
		border-spacing: 0;
		border-collapse: collapse;
		thead {
			tr {
				color: #acacac;
				border-bottom: 1px solid lightgray;
				margin-bottom: 15px;
			}
		}

		td {
			font-size: .8rem;
			padding: .4rem;
			letter-spacing: 1px;
			border-radius: 3px;
			&.day {
				cursor: pointer;
				transition: background-color 190ms ease-in-out;
			}

			&.onToday {
				font-weight: bold;
				color: #C60;
			}

			&.onSelect {
				font-weight: bold;
			}

			&.day:hover {
				color: darken(#e0ecf9, 50%);
				background-color: #e9e9e9;
			}
		}
	}

	.idCalendarPre , .idCalendarNext {
		cursor: pointer;
		font-size: 1.2rem;
		text-align: center;
		border-radius: 3px;
		padding: 2px 5px;
		&:hover {
			background-color: #e9e9e9;
		}
	}

	.idCalendarPre {
		float: left;
	}

	.idCalendarNext {
		float: right;
	}

	.btns {
		position: absolute;
		left: 15px;
		bottom: 5px;
		input[type=button] {
			font-size: .8rem;
			padding: 2px 4px;
			margin: 1px;
		}
	}
}

// 日历 悬浮出现
.aj-form-calendar-input {
	position: relative;
	width: 150px;
	display: inline-block;
	input[type=text] {
		max-width: 100% ! important;
		width: 100% ! important;
		height: 22px;
	}

	.icon {
		position: absolute;
		width: 17px;
		height: 16px;
		right: 5px;
		top: 5px;
		opacity: .6;
		cursor: pointer;
		.menu {
			color: #000;
			position: absolute;
			margin-left: 2px;
			margin-top: 8px;
			width: 17px;
			height: 1px;
			background-color: currentColor;
			&:before {
				content: '';
				position: absolute;
				top: -5px;
				left: 0;
				width: 17px;
				height: 1px;
				background-color: currentColor;
			}

			&:after {
				content: '';
				position: absolute;
				top: 5px;
				left: 0;
				width: 17px;
				height: 1px;
				background-color: currentColor;
			}
		}
	}

	.aj-form-calendar {
		z-index: 999999999;
		display: none;
		position: absolute;
		
		&.positionFixed {// 若父元素 overflow:hidden，则 position: absolute 不能完整显示，故 fixed
			position: fixed;
		}

		right: -3px;
		top: 25px;
	}

	&:hover .aj-form-calendar , .aj-form-calendar:hover {
		display: block;
		.icon {
			opacity: .5;
		}
	}

	&:hover .icon {
		opacity: 1;
	}
}

.aj-form-html-editor {
	ul.toolbar {
		border: 1px solid #C5C5C5;
		border-radius: 4px 4px 0 0;
		border-bottom: 0;
		background-color: #E8E7E4;
		width: 100%;
		height: 30px;
		margin: 0;
		box-sizing: border-box;
		padding: 3px 4px;
		& > li {
			list-style: none;
			float: left;
			cursor: pointer;
			& > span {
				border: 1px solid transparent;
				min-width: 25px;
				height: 20px;
				display: block;
				background-image: url('@{assetFilePath}/common/icon/htmleditor_css_sprites.png');
				&:hover {
					border-right-color: #aaa;
					border-bottom-color: #aaa;
					border-top-color: #fff;
					border-left-color: #fff;
				}

				&:active {
					border-right-color: #f3f8fc;
					border-bottom-color: #f3f8fc;
					border-top-color: #ccc;
					border-left-color: #ccc;
				}
			}

			ul li {
				padding: 3px;
				cursor: pointer;
				&:hover {
					background-color: lightgray;
				}
			}

			.bg-4 {
				background-position: -10px -10px;
			}

			.bg-5 {
				background-position: -55px -10px;
			}

			.bg-6 {
				background-position: -10px -90px;
			}

			.bg-7 {
				background-position: -50px -90px;
			}

			.bg-8 {
				background-position: -90px -90px;
			}

			.bg-9 {
				background-position: -141px -10px;
			}

			.bg-10 {
				background-position: -141px -50px;
			}

			.bg-11 {
				background-position: -141px -90px;
			}

			.bg-12 {
				background-position: -10px -130px;
			}

			.bg-13 {
				background-position: -50px -130px;
			}

			.bg-14 {
				background-position: -90px -130px;
			}

			.bg-15 {
				background-position: -130px -130px;
			}

			.bg-16 {
				background-position: -54px -50px;
			}

			.bg-17 {
				background-position: -10px -50px;
			}

			.bg-18 {
				background-position: -100px -10px;
			}

			.bg-19 {
				background-position: -100px -50px;
			}
			
			.cleanHTML{
				background: no-repeat center url('@{assetFilePath}/common/icon/clean.png');
				background-size: 16px 16px;
			}

			.noBg {
				background-image: none;
			}
		}
	}

	.editorBody {
		iframe , textarea {
			border: 1px solid #C5C5C5;
			border-radius: 0 0 4px 4px;
			border-top-width: 0;
			box-sizing: border-box;
			background-color: white;
			height: 283px;
			width: 100%;
		}

		textarea {
			resize: none;
		}
	}

	.colorPicker {
		width: 210px;
		border: 1px solid #D3D3D3;
		position: absolute;
		table {
			border-collapse: collapse;
		}

		.colorhead {
			height: 23px;
			line-height: 23px;
			font-weight: bold;
			width: 100%;
		}

		.colortitle {
			margin-left: 6px;
			font-size: 12px;
		}

		.colorbody {
		}

		.colorpanel td {
			border: 1px solid #000;
			height: 10px;
			width: 10px;
			overflow: hidden;
			font-size: 1px;
			cursor: pointer;
		}
	}
	// 字体演示
	.fontfamilyChoser , .fontsizeChoser {
		a {
			padding-right: 2px;
			display: block;
			padding-left: 2px;
			padding-bottom: 2px;
			color: #000;
			line-height: 16px;
			padding-top: 2px;
			text-decoration: none;
			&:hover {
				background: #e5e5e5
			}
		}
	}
	// 登录面板 和忘记密码
	.dorpdown {
		position: relative;
		&:hover .fontfamilyChoser , .fontfamilyChoser:hover , &:hover .fontsizeChoser , .fontsizeChoser:hover , &:hover .colorPicker , .colorPicker:hover {
			display: block;
		}
	
		& > div {
			display: none;
			position: absolute;
			top: 22px;
			left: 0;
			background-color: #f5f5f5;
			border: 1px solid lightgray;
			border-top: 0;
			padding: 5px;
			width: 230px;
		}
	
		.fontsizeChoser {
			top: inherit;
			right: 0;
		}
	}
}

form.aj-form {
	&> div{
		&>div{
			display: inline-block;
		}
	}
}




